package com.sxy.dao.impl;


import com.sxy.dao.BookDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

/**
 * @author 宋鑫宇
 * @version 1.0
 */
@Repository("bookDao")
public class BookDaoImpl implements BookDao {
//    @Autowired
    @Value("5")
    private int connection;
//    @Autowired
    @Value("${name}")
    private String databaseName;

/*    public void setConnection(int connection) {
        this.connection = connection;
    }

    public void setDatabaseName(String databaseName) {
        this.databaseName = databaseName;
    }*/

    public void save() {
        System.out.println("book dao impl...." + databaseName + "," + connection);
    }
//    //表示bean初始化对应的操作
//    public void init(){
//        System.out.println("init....");
//    }
//    //表示bean销毁前对应的操作
//    public void destory(){
//        System.out.println("destory....");
//    }
}
